import service from '@/utils/request'
// @Tags Integrals
// @Summary 创建积分表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Integrals true "创建积分表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /integrals/createIntegrals [post]
export const createIntegrals = (data) => {
  return service({
    url: '/integrals/createIntegrals',
    method: 'post',
    data
  })
}

// @Tags Integrals
// @Summary 删除积分表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Integrals true "删除积分表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /integrals/deleteIntegrals [delete]
export const deleteIntegrals = (params) => {
  return service({
    url: '/integrals/deleteIntegrals',
    method: 'delete',
    params
  })
}

// @Tags Integrals
// @Summary 批量删除积分表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除积分表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /integrals/deleteIntegrals [delete]
export const deleteIntegralsByIds = (params) => {
  return service({
    url: '/integrals/deleteIntegralsByIds',
    method: 'delete',
    params
  })
}

// @Tags Integrals
// @Summary 更新积分表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Integrals true "更新积分表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /integrals/updateIntegrals [put]
export const updateIntegrals = (data) => {
  return service({
    url: '/integrals/updateIntegrals',
    method: 'put',
    data
  })
}

// @Tags Integrals
// @Summary 用id查询积分表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Integrals true "用id查询积分表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /integrals/findIntegrals [get]
export const findIntegrals = (params) => {
  return service({
    url: '/integrals/findIntegrals',
    method: 'get',
    params
  })
}

// @Tags Integrals
// @Summary 分页获取积分表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取积分表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /integrals/getIntegralsList [get]
export const getIntegralsList = (params) => {
  return service({
    url: '/integrals/getIntegralsList',
    method: 'get',
    params
  })
}

// @Tags Integrals
// @Summary 不需要鉴权的积分表接口
// @accept application/json
// @Produce application/json
// @Param data query IntegralReq.IntegralsSearch true "分页获取积分表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /integrals/getIntegralsPublic [get]
export const getIntegralsPublic = () => {
  return service({
    url: '/integrals/getIntegralsPublic',
    method: 'get',
  })
}
